<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:winter="http://www.winter.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="/layouts/layout">
	
	<div id="NaturalezasGestionFragment" th:fragment="NaturalezasGestionFragment">
		<winter:output id="mainNaturalezaDialogOutput" class="winter-form form-container">
			<winter:output id="formNaturalezaDialogOutput" class="cabecera">
<!-- 				<div id="NaturalezaDialogForm" > -->
					<winter:row columns="2">
						<winter:column type="col-md-4">
						  	<winter:select 
								id="NuevoConcSelectTipoNaturaleza"
								field="*{naturaleza.naturaleza}" 
								collection="tipNat, rowtipNat : ${controles.tiposNaturaleza}"
								value="@{${tipNat.id}+'|'+${tipNat.nombre}}"
								text="@{${tipNat.nombre}}"
								label="#{label.control.naturaleza.naturaleza}"
								required="true"
								requiredimage="/images/icons/exclamation-small-red.png"
								requiredmessage="#{label.control.naturaleza.naturaleza.requerido}"
								modern="true" 
								showglobalmessage="true">
							</winter:select>
							<!-- <winter:inputtext 
			                   id="@{'AutocompleteNaturalezaFiltro'}" 
			                   field="*{naturaleza.naturaleza.nombre}"
			                   label="#{label.control.naturaleza.naturaleza}"
			                   display="table-cell"
			                   autocompleteurl="@{'/controles/acNaturaleza'}"
	                           autocompletelabel="nombre"
	                           autocompletevalue="id"
	                           autocompletefield="*{naturaleza.idnaturaleza}"                           
			                   containerdisplay="inline-block">
				            </winter:inputtext>
				            <winter:event id="eventNaturalezaFiltro"
                                event="change"
                                target="AutocompleteNaturalezaFiltro"
                                url="@{'/controles/eventNaturaleza'}"
                                form="ControlesForm"
                                update="mainNaturalezaDialogOutput" object="controles" immediate="true">
                             </winter:event> -->
						</winter:column>
						<winter:column type="col-md-4">
							<winter:select id="selectMonedaNaturaleza" field="*{naturaleza.moneda}"
								collection="mon, rowmon : ${controles.monedas}"
								value="@{${mon.id}+'|'+${mon.descripcion}}"
								text="@{${mon.descripcion}}" showglobalmessage="true"
								label="#{label.control.naturaleza.moneda}" required="true"
								requiredmessage="#{label.control.naturaleza.moneda.requerido}" modern="true">
							</winter:select>
						</winter:column>
					</winter:row>
					<winter:row>
						<winter:column type="col-md-4">
							<winter:inputtext
								id="NuevaNatValor"
								label="#{label.control.naturaleza.valor}"
								field="*{naturaleza.valor}"
								labeldisplay="col-xs-4"
								inputdisplay="col-xs-8"
								containerdisplay="row padded"
								class="winter-input-text input-cambio"
								placeholder="#{label.control.naturaleza.valor}"
								format="true"
								thousandsSeparator="."
								decimalSeparator=","
								decimalLimit="0"
								required="true"
								requiredimage="/images/icons/exclamation-small-red.png"
								requiredmessage="#{label.control.naturaleza.valor.requerido}">
							</winter:inputtext>
						</winter:column>
						<winter:column type="col-md-4">
							<winter:inputtext
								id="NuevaNatValorImponible"
								label="#{label.control.naturaleza.valorimponible}"
								field="*{naturaleza.valorimponible}"
								labeldisplay="col-xs-4"
								inputdisplay="col-xs-8"
								containerdisplay="row padded"
								placeholder="#{label.control.naturaleza.valorimponible}"
								class="winter-input-text input-cambio"
								format="true"
								type="float"
								thousandsSeparator="."
								decimalSeparator=","
								decimalLimit="0"
								required="true"
								requiredimage="/images/icons/exclamation-small-red.png"
								requiredmessage="#{label.control.naturaleza.valorimponible.requerido}">
							</winter:inputtext>
						</winter:column>
						<!-- <winter:column type="col-md-4">
							<winter:inputtext
								id="NuevaNatOrden"
								label="#{label.control.naturaleza.orden}"
								field="*{naturaleza.orden}"
								display="table-cell"
								containerdisplay="table-cell-align-top"
								removecontainer="true"
								placeholder="#{label.control.naturaleza.orden}"
								required="true"
								requiredimage="/images/icons/exclamation-small-red.png"
								requiredmessage="#{label.control.naturaleza.orden.requerido}">
							</winter:inputtext>
						</winter:column> -->
					</winter:row>
				<winter:row class="button-panel-right" padded="true">
					<winter:ajaxSubmit 
						id="GrabarNaturaleza"
						form="ControlesForm"
						oncomplete="@{'Winter.ui.CloseDialog(\'NaturalezasModal\')'}"
						url="@{'/controles/grabarNaturaleza'}"
						update="NaturalezasInclude"
						value="#{label.operaciones.guardar}"
						class="btn btn-cyan"
						object="controles"
						showstatus="true"
						confirmationrequired="false"
						confirmationtext="Esta seguro de que desea confirmar los cambios realizados?"
						process="formNaturalezaDialogOutput">
					</winter:ajaxSubmit>
					<winter:ajaxSubmit 
						id="SalirNaturalezaButton"
						form="ControlesForm"
						oncomplete="@{'Winter.ui.CloseDialog(\'NaturalezasModal\')'}"
						url="@{'/controles/cancelar/NATURALEZA'}"
						update="NaturalezaOutput"
						value="#{label.operaciones.cancelar}"
						class="btn btn-danger"
						object="controles"
						showstatus="true"
						confirmationrequired="false"
						confirmationtext="Esta seguro de que desea descartar los cambios realizados?"
						immediate="true">
					</winter:ajaxSubmit>
				</winter:row>
<!-- 		        </div> -->
		    </winter:output>
		</winter:output>
	</div>
</html>